package com.hopu.controller;

import com.hopu.entity.Message;
import com.hopu.entity.Result;
import com.hopu.service.impl.MessageService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/message")
public class MessageController {
    @Resource
    private MessageService messageService;

    @RequestMapping("/selectMessage")
    public Result message() {
        List<Message> messages=  messageService.selectMessage();
        return Result.success(messages);
    }
}
